import 'package:json_annotation/json_annotation.dart';
import 'dart:convert';
part 'stock.g.dart';


List<Stock> getStockList(List<dynamic> list){
  List<Stock> result = [];
  for (var item in list) {
    result.add(Stock.fromJson(item));
  }
  return result;
}
@JsonSerializable()
class Stock extends Object {

  @JsonKey(name: 'dm')
  String dm;

  @JsonKey(name: 'mc')
  String mc;

  @JsonKey(name: 'jys')
  String jys;

  Stock(this.dm,this.mc,this.jys,);

  factory Stock.fromJson(Map<String, dynamic> srcJson) => _$StockFromJson(srcJson);

  Map<String, dynamic> toJson() => _$StockToJson(this);


    @override
    String toString() {
       var str = jsonEncode(this);
      return str;
    }
}


